<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        /* 
          
          background-origin 背景图片的偏移量计算的原点
             padding-box 默认值，background-position从内边距处开始计算
             content-box 背景图片的偏移量从内容区处计算
             border-box 背景图片的变量从边框处开始计算
         */
      .box{
          border: 10px dashed red;
          width: 500px;
          background-color: royalblue;
          height: 500px;
          margin: 50px auto;
          padding: 50px;
          background-image: url(./img/a.jpg);
          background-repeat: no-repeat;
          background-position: 20px 20px ;
          background-origin: padding-box;
      }
    </style>
</head>
<body>
    <div class="box">

    </div>
    
</body>
</html>